package com.cskaoyan.bean.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @program: project2_market
 * @time: 2021/10/19
 * @author: yangshuai
 **/

@NoArgsConstructor
@Data
public class StatUserVo {

    private List<String> columns;
    private List<Rows> rows;

    @NoArgsConstructor
    @Data
    public static class Rows {
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        private Date day;
        private Integer users;

        public Rows(Date day, Integer users) {
            this.day = day;
            this.users = users;
        }
    }

    public StatUserVo(List<String> columns, List<Rows> rows) {
        this.columns = columns;
        this.rows = rows;
    }

}
